package com.wxw.gulidemo.controller.front;/**
 * @author by xxz
 * @date 2022/6/14
 */

import com.wxw.gulidemo.R;
import com.wxw.gulidemo.entity.CrmBanner;
import com.wxw.gulidemo.service.ICrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description

 * @author by xxz

 * @date 2022/6/14

 * @throws
 */
@RestController
@CrossOrigin
@RequestMapping("/cmsService/frontCrmBanner")
public class BannerFrontController {
    @Autowired
    private ICrmBannerService crmBannerService;

    //查询所有幻灯片
    @GetMapping("getAll")
    public R getAll(){
        List<CrmBanner> list = crmBannerService.getAllBanner();
        return R.ok().data("list",list);
    }
}
